


'use strict';

define([
		'app',
		'utils/route-config'
	],

	function (app, routeConfig) {


			return app.config(['$routeProvider',function ($routeProvider) {
				var httpServicePath = "app/js/services/http-service.js";
				var pageDirPath = "directives/paging";
				var showErrorPath = "directives/show-error";
				var uploadPath = "directives/file-upload";
				var autoCompletePath = "directives/auto-complete";

				$routeProvider.when('/production', routeConfig.config('production.html', 'production.js',{
					services:[httpServicePath], directives:[pageDirPath,uploadPath]
				}));

				$routeProvider.when('/edit-production/:id', routeConfig.config('edit-production.html', 'edit-production.js',{
					services:[httpServicePath], directives:[showErrorPath, uploadPath, autoCompletePath]
				}));


				$routeProvider.when('/classification', routeConfig.config('classification.html', 'classification.js',{
					services:[httpServicePath], directives:[showErrorPath]
				}));

				$routeProvider.when('/property', routeConfig.config('property.html', 'property.js',{
					services:[httpServicePath], directives:[showErrorPath]
				}));

				$routeProvider.when('/customer', routeConfig.config('customer.html', 'customer.js',{
					services:[httpServicePath], directives:[pageDirPath,uploadPath]
				}));

				$routeProvider.when('/edit-customer/:id', routeConfig.config('edit-customer.html', 'edit-customer.js',{
					services:[httpServicePath], directives:[showErrorPath, uploadPath, autoCompletePath]
				}));

				$routeProvider.when('/group', routeConfig.config('group.html', 'group.js',{
					services:[httpServicePath], directives:[showErrorPath]
				}));

				$routeProvider.when('/point-rule', routeConfig.config('point-rule.html', 'point-rule.js',{
					services:[httpServicePath], directives:[showErrorPath]
				}));

				$routeProvider.when('/edit-order/:id', routeConfig.config('edit-order.html', 'edit-order.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));

				$routeProvider.when('/order', routeConfig.config('order.html', 'order.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));

				$routeProvider.when('/order-detail/:id', routeConfig.config('order-detail.html', 'order-detail.js',{
					services:[httpServicePath], directives:[]
				}));

				$routeProvider.when('/record/:id', routeConfig.config('record.html', 'record.js',{
					services:[httpServicePath], directives:[]
				}));


				$routeProvider.when('/refund-order', routeConfig.config('refund-order.html', 'refund-order.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));

				$routeProvider.when('/edit-coupon/:id', routeConfig.config('edit-coupon.html', 'edit-coupon.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));

				$routeProvider.when('/coupon', routeConfig.config('coupon.html', 'coupon.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));

				$routeProvider.when('/edit-present/:id', routeConfig.config('edit-present.html', 'edit-present.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));

				$routeProvider.when('/present', routeConfig.config('present.html', 'present.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));

				$routeProvider.when('/edit-discount-activity/:id', routeConfig.config('edit-discount-activity.html', 'edit-discount-activity.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));


				$routeProvider.when('/discount-activity', routeConfig.config('discount-activity.html', 'discount-activity.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));


				$routeProvider.when('/edit-rebeat/:id', routeConfig.config('edit-rebeat.html', 'edit-rebeat.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));


				$routeProvider.when('/rebeat', routeConfig.config('rebeat.html', 'rebeat.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));


				$routeProvider.when('/edit-full-cut-activity/:id', routeConfig.config('edit-full-cut-activity.html', 'edit-full-cut-activity.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));


				$routeProvider.when('/full-cut-activity', routeConfig.config('full-cut-activity.html', 'full-cut-activity.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));


				$routeProvider.when('/edit-user-role/:id', routeConfig.config('edit-user-role.html', 'edit-user-role.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));


				$routeProvider.when('/user-role', routeConfig.config('user-role.html', 'user-role.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));

				$routeProvider.when('/edit-user/:id', routeConfig.config('edit-user.html', 'edit-user.js',{
					services:[httpServicePath], directives:[showErrorPath, autoCompletePath]
				}));

				$routeProvider.when('/user', routeConfig.config('user.html', 'user.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));


				$routeProvider.when('/config', routeConfig.config('config.html', 'config.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));


				$routeProvider.when('/search-key', routeConfig.config('search-key.html', 'search-key.js',{
					services:[httpServicePath], directives:[pageDirPath]
				}));



				$routeProvider.otherwise({redirectTo:'/'});
		}]);
	});



